Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: linkedin v2 provider #3804

Merged
merged 10 commits into from
Mar 12, 2024
Merged

feat: linkedin v2 provider #3804

merged 10 commits into from
Mar 12, 2024

Conversation

hperl
Copy link
Contributor

@hperl hperl commented Mar 7, 2024

This PR adds a new "v2" LinkedIn provider that overwrites the issuer URL which is set to https://www.linkedin.com even though the discovery URL is under https://www.linkedin.com/oauth/.well-known/openid-configuration. The v2 provider uses the generic provider for as much work as possible and only overwrites the concrete issuer URL.

Additionally, I had to "discover" the format of the locale claim, which is an object for LinkedIn and a string for Discord.

The tests "just" test that we can now do a successful discovery.

Additionally, I confirmed this working manually.

Related issue(s)

Fixes #3655

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@hperl hperl self-assigned this Mar 7, 2024
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 90.32258% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 77.96%. Comparing base (49e1a39) to head (21bf198).

Files Patch % Lines
selfservice/strategy/oidc/provider_linkedin_v2.go 85.71% 2 Missing ⚠️
selfservice/strategy/oidc/provider_discord.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3804      +/-   ##
==========================================
- Coverage   77.97%   77.96%   -0.01%     
==========================================
  Files         357      358       +1     
  Lines       25138    25166      +28     
==========================================
+ Hits        19601    19621      +20     
- Misses       4031     4036       +5     
- Partials     1506     1509       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

zepatrik
zepatrik previously approved these changes Mar 7, 2024
Copy link
Member

@zepatrik zepatrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy fix 👍

contrib/quickstart/kratos/oidc/kratos.yml Outdated Show resolved Hide resolved
zepatrik
zepatrik previously approved these changes Mar 7, 2024
@hperl hperl enabled auto-merge (squash) March 7, 2024 16:43
@aeneasr
Copy link
Member

aeneasr commented Mar 8, 2024

All tests fail

@hperl hperl merged commit a6ad983 into master Mar 12, 2024
29 checks passed
@hperl hperl deleted the hperl/linkedin-v2 branch March 12, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LinkedIn social login oidc broken for new setups
3 participants